package com.beidouapp.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

/**
 * 基础的Mapper抽象.
 *
 * @param <T>
 */
public interface BaseMapper<T> {

    public T getEntryByID(@Param("id") Long id);

    public List<T> findEntryList(T entry);

    public Integer findEntryCount(T entry);

    public List<T> findEntryListByMap(Map<String, Object> paramters);

    public List<T> findEntryListByMap(RowBounds rowBounds, Map<String, Object> paramters);

    public long findEntryCountByMap(Map<String, Object> paramters);

    public int addEntry(T entry);

    public int addEntryBatch(List<T> entryList);

    public int removeEntryByID(@Param("id") Long id);

    public int removeEntry(T entry);

    public int removeEntryBatch(List<Long> idList);

    public int removeEntryByMap(Map<String, Object> paramters);

    public int modifyEntry(T entry);
}
